package com.wztk.shydemo.proxy;

/**
 * Created by win7 on 2016/7/6.
 */
public class ShellManager {

    //执行线程类
    private static final class ScriptRunner extends Thread {
        public ScriptRunner(String command, boolean isRoot){
            String[] commandsArray =  command.split("\n");
            ShellUtils.CommandResult result = ShellUtils.execCommand(commandsArray, isRoot);
        }
        @Override
        public void run() {

        }
    }
    public static  boolean runCommand(String command, boolean isRoot) {
        String[] commandsArray =  command.split("\n");
        ShellUtils.CommandResult result = ShellUtils.execCommand(commandsArray, isRoot);
        if (0 == result.result){
            return true;
        }else{
            return false;
        }
    }
}

